package com.chennan.pattern.chain.low;


import com.chennan.pattern.chain.low.impl.HaveBreakfastFilter;
import com.chennan.pattern.chain.low.impl.WashFaceFilter;
import com.chennan.pattern.chain.low.impl.WashHairFilter;

/**
 * @author chennan
 * @createTime 2022年02月24日 16:25:00
 */
public class TestLow {
    public static void main(String[] args) {
        PreparationList preparationList = new PreparationList();
        preparationList.setWashFace(true);
        preparationList.setWashHair(false);
        preparationList.setHaveBreakfast(true);

        Study study = new Study();

        AbstractPrepareFilter haveBreakfastFilter = new HaveBreakfastFilter(null);
        AbstractPrepareFilter washFaceFilter = new WashFaceFilter(haveBreakfastFilter);
        AbstractPrepareFilter washHairFilter = new WashHairFilter(washFaceFilter);

        washHairFilter.doFilter(preparationList, study);
    }
}
